package isanfeng.tuxiaoer.pattern.structural.adapter.example;

/**
 * @author 李红辉
 * @version 1.0
 * @date 2019/10/12 19:04
 */
public class PowerAdapter implements DC5 {
    private AC220Adaptee ac220Adaptee = new AC220Adaptee();

    @Override
    public int outputDC5V() {
        int adapterInput = ac220Adaptee.outputAC220V();
        // 变压器...
        int output = adapterInput / 44;
        System.out.println("使用PowerAdapter输入AC：" + adapterInput + "V" + "输出DC：" + output + "V");
        return output;
    }
}
